home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best of Shareware
/
Best of PC Windows Shareware 1.0 - Wayzata Technology (7111) (1993).iso
/
mac
/
DOS
/
TELECOMM
/
PCCP047
/
MANUAL
< prev
next >
Wrap
Text File
|
1992-08-28
|
9KB
|
218 lines
Pete Cann's Communication Package
Portions Copyright (C) 1992 Peter Edward Cann
(Please see the file README for legal junk)
This is a set of programs and data files for communication between a
PC and something external, possibly over a modem. It is drastically
different from most other communications programs, in that it is
highly modular and generally requires the user to write batch files
and/or scripts to make use of it. This is what you might call a
"hacker style" paradigm (not to be confused with "cracker", generally
an infantile individual who feels so insignificant that they screw
other people in a desperate attempt to feel powerful). Hackers are
people who are very comfortable with computers, and like to have a
lot of control and to know what's going on. The source code for all
of these programs is included in the distribution, so if you know C
you have all the information I do now.
All of the programs give USAGE: information if invoked without
arguments. All of the programs that use a port can use COM 1 through
8, but COM 5 and 6 are only for AT and later machines and have not
been tested.
The centerpiece of the package is TERM. This is a terminal emulator.
It takes an emulation file, which you create or modify with EMUED.
EMUED lets you specify strings to send for any programmable key, and
lets you enter strings of characters and substitution tokens to
invoke functions. These would be the "escape sequences", although
they need not begin with Escape. The token codes are in EMU.H. The
emulation facility also provides a graphics character substitution
table for graphics character commands. TERM and EMUED look in the
directory named by the PCCPPATH environment variable for emulation
files, if PCCPPATH is set. The program CCODES types a hex listing of
display character codes for use when assigning graphics characters in
EMUED.
TERM generates a CRLF in response to a Linefeed character, so it is
often desirable to program an emulation to do a DOWN in response to a
Linefeed. For LF insertion, the function CRLF can be performed in
response to a CR. If the emulation file basename is prefixed with a
plus sign (+), local echo is activated.
The program TERMPLAY will step a file through an emulation.
The program MASTERM invokes term with the three or four arguments,
but if you exit TERM you get a menu for file transfers or beginning a
dribble file. The file transfer programs are three variations on
XMODEM in each direction, and have fairly clear names.
The program SESSION is a simple host program, for use AFTER password
validation by the script facility. It is hard-coded for 8n1 bits. It
expects the modem to be in AT&C1 mode, that is, Carrier Detect
conveys information. The last (optional) two arguments to SESSION are
directories for download and upload. If they are given, they are
prepended to the entered pathname in file transfer operations. If a
directory is given, dot-dot (..) is prohibited in pathnames and the
Shell option is not available.
The environment of any subschell contains REMOTE=YES, so you can do
IF NOT "%REMOTE%"=="YES" THING
in a batch file, where THING is something that would be bad to do
from a comport, such as run a display editor. SESSION terminates if
Carrier Detect goes false, unless it is running the shell.
The program MESSIN accepts a message from the port and appends it to
the specified file. This is for email to the sysop. The program
MESSOUT asks for a filename in the specified directory and displays
it with pagination. Security is achieved through sparse naming.
The program COMSCRPT runs scripts. It is very powerful, with multiple
branching look-fors, timeouts and retry limits.
The script file must have the extension ".SCR". If the PCCPPATH
environment variable is set, the program looks for the script there.
The program loads the script into RAM and then executes it. Lines are
limited to 80 characters. The number of lines is limited to 512.
The characters '|' and '~' are special. '|' means CR in < lines and >
lines (LF is stripped for > processing); and newline in ! lines. '~'
means 0.4 second delay in < lines and bell in ! lines. (In > lines it
means itself.) Also, in < and > lines, `xx (backquote followed by two
hex digits) expands to the specified character code. Letters in the
hex number may be either case. There is no validity checking. Also in
< lines, ^ means break. To send a magic character, use its hex code
with a backquote.
The first line of the script file is the first three arguments as for
TERM, space-delimited. In subsequent lines, the first character of
each line is the command; the rest of the line (after the delimiting
space) is argument(s). A final string argument may include spaces,
and begins after the delimiting space. Blank lines are ignored.
The command characters are as follows:
;
{introduces comment; line ignored; space not required}
: <decimal number 0-255>
{label for conditional or unconditional goto}
g <label #>
{goto label #}
* <label #>
{establishes a demon to goto label upon Control-X from keyboard}
{* -1 cancels}
r <label #> <retries> <register>
{increments specified retry register}
{zeros register and goes to label if register > retries}
{register is 0 - 255}
0 <retry register>
{zeros the specified retry register}
p <seconds>
{processes pending look-fors; falls through upon timeout}
{clears pending look-for list upon completion}
{zero seconds indicates no timeout}
> <label #> <string>
{look for string upon p command; if hit goto label}
{incoming linefeeds ignored}
{first come, first served}
{maximum of 32 active > demons allowed}
? <label #>
{goto label if Clear To Send or Tx Hold Reg Empty is false}
d <label #>
{goto label if Carrier Detect is true}
< <string>
{send string to port}
! <string>
{send string to console}
x <label #> <command line string>
{run executable file with arguments and wait for termination}
{goto label # if non-zero exit code}
s <label #> <command line string>
{run system command line and wait for termination}
{goto label # if error in running command.com}
{will not report errors within command string}
+
{Raise DTR handshake line}
-
{Drop DTR handshake line}
k <label> <character>
{set branch to label upon keyboard character received in w function}
{limit 64 simultaneous characters pending}
w <seconds>
{wait seconds for keyboard character, performing k dispatching}
{fall through if no character in <seconds> seconds}
{zero seconds indicates no timeout}
{clears all k commands pending upon any termination}
c
{clears pending lookfors and keys (> and k)}
q <exit code>
{quit with exit code}
{codes other than zero under 128 are reserved to internals}
When scripting modem commands, which is how you're intended to
configure and dial the modem, try a ~ before and after the at, for
instance:
< ~at~&f&c1&d2|
The program SCRCHK types a listing of the argument script file giving
statement numbers, which are not the same as line numbers. It leaves
out blank lines for some reason. It also detects some errors,
including potential branching to undefined labels. It prints out a
table of label numbers with their corresponding line numbers.
During execution of a script, Control-C will cancel and Control-X can
redirect the script on an interrupt basis.
All of the I/O programs except TERM pay attention to CTS. None of
them do XON/XOFF. The computer is assumed to be fast enough to keep
up. However, since DOS video is very slow, TERM will suspend display
if a buffer overrun threatens.
FAX PROGRAMS
RCVFAX receives a fax from a Class 2 modem. It is intended to be
called immediately after the "FAX" response. See HOSTDEMO.SCR for how
to configure the faxmodem. RCVFAX uses the first speed until it sees
the "+FCON" message, then switches to the second speed, which will
generally be 19200 with Rockwell-based modems. It stimulates page
transmits, and stores the session in the specified directory in a
file of which the name is the universal time as an 8-digit hex number
with the extension .RFX.
Since the filenames are awkward, FAXMANIP, when run in the fax
directory, displays RFX files as dates and times, and allows you to
convert or delete. A secret FAXMANIP function is E, which will run a
system call on the first argument, space, filename. This is intended
for editing, by the adventurous. Also, when an argument is given to
FAXMANIP, debugging output is turned on in RFXTOPCX.
RFXTOPCX converts an RFX file to a series of PCX files, prompting for
the name of each page file and reporting status. A second argument
turns on debugging output.